<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        *{
            list-style: none;
            text-decoration: none;
        }

        ul{
            background-color: rgb(133, 127, 127);
            overflow: hidden;

        }

        ul li{
            /* 不显示的指定宽高
            使用行高代替高度可以供子元素继承
            
             */
            float: left;
            margin-right: 30px;
            line-height: 30px;
        }

        ul li a{
            display: inline-block;
        }


    </style>
</head>
<body>
 <ul>
     <li><a href="#">Java</a></li>
     <li><a href="#">Python</a></li>
     <li><a href="#">GO</a></li>
 </ul>
</body>
</html>